#!/usr/bin/env bash

PACKAGE_NAME="$1"
PACKAGE_VERSION="$2"

if [ "$PACKAGE_NAME" = "" ]; then
    PACKAGE_NAME=flowfe
fi
if [ "$PACKAGE_VERSION" = "" ]; then
    PACKAGE_VERSION=latest
fi

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
PROJECT_ROOT=$(dirname ${SCRIPT_DIR})
cd ${PROJECT_ROOT}
targetimage="${PACKAGE_NAME}:${PACKAGE_VERSION}"
docker build -f ${SCRIPT_DIR}/Dockerfile -t $targetimage .
